﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="AnalyticsFieldNamesHelper.cs" company="">
//   
// </copyright>
// <summary>
//   The analytics field names helper.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace XRay.Library.Contracts
{
    #region

    using System.Collections.Generic;

    #endregion

    /// <summary>
    ///     The analytics field names helper.
    /// </summary>
    public static class AnalyticsFieldNamesHelper
    {
        #region Static Fields

        /// <summary>
        ///     The log fields dictionary.
        /// </summary>
        public static Dictionary<string, string> LogFieldsDictionary = new Dictionary<string, string>
                                                                           {
                                                                               {
                                                                                   "0", 
                                                                                   "version-number"
                                                                               }, 
                                                                               {
                                                                                   "1", 
                                                                                   "request-start-time"
                                                                               }, 
                                                                               {
                                                                                   "2", 
                                                                                   "operation-type"
                                                                               }, 
                                                                               {
                                                                                   "3", 
                                                                                   "request-status"
                                                                               }, 
                                                                               {
                                                                                   "4", 
                                                                                   "http-status-code"
                                                                               }, 
                                                                               {
                                                                                   "5", 
                                                                                   "end-to-end-latency-in-ms"
                                                                               }, 
                                                                               {
                                                                                   "6", 
                                                                                   "server-latency-in-ms"
                                                                               }, 
                                                                               {
                                                                                   "7", 
                                                                                   "authentication-type"
                                                                               }, 
                                                                               {
                                                                                   "8", 
                                                                                   "requestor-account-name"
                                                                               }, 
                                                                               {
                                                                                   "9", 
                                                                                   "owner-account-name"
                                                                               }, 
                                                                               {
                                                                                   "10", 
                                                                                   "service-type"
                                                                               }, 
                                                                               {
                                                                                   "11", 
                                                                                   "request-url"
                                                                               }, 
                                                                               {
                                                                                   "12", 
                                                                                   "requested-object-key"
                                                                               }, 
                                                                               {
                                                                                   "13", 
                                                                                   "request-id-header"
                                                                               }, 
                                                                               {
                                                                                   "14", 
                                                                                   "operation-count"
                                                                               }, 
                                                                               {
                                                                                   "15", 
                                                                                   "requestor-ip-address"
                                                                               }, 
                                                                               {
                                                                                   "16", 
                                                                                   "request-version-header"
                                                                               }, 
                                                                               {
                                                                                   "17", 
                                                                                   "request-header-size"
                                                                               }, 
                                                                               {
                                                                                   "18", 
                                                                                   "request-packet-size"
                                                                               }, 
                                                                               {
                                                                                   "19", 
                                                                                   "response-header-size"
                                                                               }, 
                                                                               {
                                                                                   "20", 
                                                                                   "response-packet-size"
                                                                               }, 
                                                                               {
                                                                                   "21", 
                                                                                   "request-content-length"
                                                                               }, 
                                                                               {
                                                                                   "22", 
                                                                                   "request-md5"
                                                                               }, 
                                                                               {
                                                                                   "23", 
                                                                                   "server-md5"
                                                                               }, 
                                                                               {
                                                                                   "24", 
                                                                                   "etag-identifier"
                                                                               }, 
                                                                               {
                                                                                   "25", 
                                                                                   "last-modified-time"
                                                                               }, 
                                                                               {
                                                                                   "26", 
                                                                                   "conditions-used"
                                                                               }, 
                                                                               {
                                                                                   "27", 
                                                                                   "user-agent-header"
                                                                               }, 
                                                                               {
                                                                                   "28", 
                                                                                   "referrer-header"
                                                                               }, 
                                                                               {
                                                                                   "29", 
                                                                                   "client-request-id"
                                                                               }
                                                                           };

        /// <summary>
        ///     The status message details dictionary.
        /// </summary>
        public static Dictionary<StatusMessagesEnum, StatusMessageDetails> StatusMessageDetailsDictionary =
            new Dictionary<StatusMessagesEnum, StatusMessageDetails>
                {
                    {
                        // Success
                        StatusMessagesEnum.Success, 
                        new StatusMessageDetails(true, true)
                    }, 
                    {
                        StatusMessagesEnum.AnonymousSuccess, 
                        new StatusMessageDetails(true, true)
                    }, 
                    {
                        StatusMessagesEnum.SASSuccess, 
                        new StatusMessageDetails(true, true)
                    }, 
                    {
                        // Throtttling errors
                        StatusMessagesEnum.ThrottlingError, 
                        new StatusMessageDetails(false, false)
                    }, 
                    {
                        StatusMessagesEnum.AnonymousThrottlingError, 
                        new StatusMessageDetails(false, false)
                    }, 
                    {
                        StatusMessagesEnum.SASThrottlingError, 
                        new StatusMessageDetails(false, false)
                    }, 
                    {
                        // Client timeout errors
                        StatusMessagesEnum.ClientTimeoutError, 
                        new StatusMessageDetails(true, true)
                    }, 
                    {
                        StatusMessagesEnum.AnonymousClientTimeoutError, 
                        new StatusMessageDetails(true, true)
                    }, 
                    {
                        StatusMessagesEnum.SASClientTimeoutError, 
                        new StatusMessageDetails(true, true)
                    }, 
                    {
                        // Server timeout errors
                        StatusMessagesEnum.ServerTimeoutError, 
                        new StatusMessageDetails(false, true)
                    }, 
                    {
                        StatusMessagesEnum.AnonymousServerTimeoutError, 
                        new StatusMessageDetails(false, true)
                    }, 
                    {
                        StatusMessagesEnum.SASServerTimeoutError, 
                        new StatusMessageDetails(false, true)
                    }, 
                    {
                        // Client other errors
                        StatusMessagesEnum.ClientOtherError, 
                        new StatusMessageDetails(true, true)
                    }, 
                    {
                        StatusMessagesEnum.SASClientOtherError, 
                        new StatusMessageDetails(true, true)
                    }, 
                    {
                        StatusMessagesEnum.AnonymousClientOtherError, 
                        new StatusMessageDetails(true, true)
                    }, 
                    {
                        // Server other errors
                        StatusMessagesEnum.ServerOtherError, 
                        new StatusMessageDetails(false, true)
                    }, 
                    {
                        StatusMessagesEnum.AnonymousServerOtherError, 
                        new StatusMessageDetails(false, true)
                    }, 
                    {
                        StatusMessagesEnum.SASServerOtherError, 
                        new StatusMessageDetails(false, true)
                    }, 
                    {
                        // Authorization errors
                        StatusMessagesEnum.AuthorizationError, 
                        new StatusMessageDetails(true, true)
                    }, 
                    {
                        StatusMessagesEnum.AnonymousAuthorizationError, 
                        new StatusMessageDetails(false, false)
                    }, 
                    {
                        StatusMessagesEnum.SASAuthorizationError, 
                        new StatusMessageDetails(true, true)
                    }, 
                    {
                        // Network errors
                        StatusMessagesEnum.NetworkError, 
                        new StatusMessageDetails(true, true)
                    }, 
                    {
                        StatusMessagesEnum.AnonymousNetworkError, 
                        new StatusMessageDetails(true, true)
                    }, 
                    {
                        StatusMessagesEnum.SASNetworkError, 
                        new StatusMessageDetails(true, true)
                    }
                };

        #endregion
    }
}